const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  // 关闭eslint
  lintOnSave: false,
  // 代理跨域配置
  devServer: {
    host: "localhost", //本地
    port: 8080, //端口号
    open: true,
    proxy: {
      // 前台项目的跨域配置
      "/api1": {
        target: "http://39.98.123.211",
        changeOrigin: true, //支持跨域
      },
      // 网页严选的跨域配置
      "/api2": {
        target: "https://m.you.163.com",
        changeOrigin: true, //支持跨域
        pathRewrite: { "^/api2": "" },  //路径重写
      },
    },
  },
});
